home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / source / gutil / bequal.c < prev    next >
Encoding:
C/C++ Source or Header  |  1985-02-05  |  423 b   |  26 lines

  1. # include    <useful.h>
  2. # include    <sccs.h>
  3.  
  4. SCCSID(@(#)bequal.c    8.2    2/5/85)
  5.  
  6. /*
  7. **  BLOCK EQUALITY TEST
  8. **
  9. **    blocks `a' and `b', both of length `l', are tested
  10. **        for absolute equality.
  11. **    Returns one for equal, zero otherwise.
  12. */
  13.  
  14. bequal(a, b, l)
  15. register char    *a, *b;
  16. register int    l;
  17. {
  18.     if ( a == (char *) 0 || b == (char *) 0 )
  19.         return ( FALSE );
  20.  
  21.     while (l-- > 0)
  22.         if (*a++ != *b++)
  23.             return(FALSE);
  24.     return(TRUE);
  25. }
  26.